package org.shangrila.bme.eo;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Date;
import java.util.List;
import java.math.BigDecimal;


/**
 * The persistent class for the bme_payroll database table.
 * 
 */
@Entity
@Table(name="bme_payroll")
@NamedQuery(name="BmePayroll.findAll", query="SELECT b FROM BmePayroll b")
public class BmePayroll implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private String id;

	private BigDecimal amount;

	@Column(name="ANNEX_FLAG")
	private int annexFlag;

	@Column(name="BANK_ACCOUNT")
	private String bankAccount;

	@Column(name="BANK_NAME")
	private String bankName;

	@Column(name="BANK_PAYEE")
	private String bankPayee;

	@Column(name="CONT_NAME")
	private String contName;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="CREATE_TIME")
	private Date createTime;

	private BigDecimal iamount;

	private String operator;

	private String phone;

	private BigDecimal ramount;

	
	private String remarks;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="REQ_DATE")
	private Date reqDate;

	private String status;

	//bi-directional many-to-one association to BmeRtnInfo
	@OneToMany(mappedBy="bmePayroll")
	private List<BmePayrollDetail> bmePayrollDetails;
	
	//bi-directional many-to-one association to BmeInvInfo
	@OneToMany(mappedBy="bmePayroll")
	private List<BmeInvInfo> bmeInvInfos;

	//bi-directional many-to-one association to BmeContract
	@ManyToOne
	@JoinColumn(name="CONT_ID")
	private BmeContract bmeContract;

	//bi-directional many-to-one association to BmeRtnInfo
	@OneToMany(mappedBy="bmePayroll")
	private List<BmeRtnInfo> bmeRtnInfos;

	public BmePayroll() {
	}

	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public BigDecimal getAmount() {
		return this.amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public int getAnnexFlag() {
		return this.annexFlag;
	}

	public void setAnnexFlag(int annexFlag) {
		this.annexFlag = annexFlag;
	}

	public String getBankAccount() {
		return this.bankAccount;
	}

	public void setBankAccount(String bankAccount) {
		this.bankAccount = bankAccount;
	}

	public String getBankName() {
		return this.bankName;
	}

	public void setBankName(String bankName) {
		this.bankName = bankName;
	}

	public String getBankPayee() {
		return this.bankPayee;
	}

	public void setBankPayee(String bankPayee) {
		this.bankPayee = bankPayee;
	}

	public String getContName() {
		return this.contName;
	}

	public void setContName(String contName) {
		this.contName = contName;
	}

	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public BigDecimal getIamount() {
		return this.iamount;
	}

	public void setIamount(BigDecimal iamount) {
		this.iamount = iamount;
	}

	public String getOperator() {
		return this.operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public String getPhone() {
		return this.phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public BigDecimal getRamount() {
		return this.ramount;
	}

	public void setRamount(BigDecimal ramount) {
		this.ramount = ramount;
	}

	public String getRemarks() {
		return this.remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getReqDate() {
		return this.reqDate;
	}

	public void setReqDate(Date reqDate) {
		this.reqDate = reqDate;
	}

	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public List<BmeInvInfo> getBmeInvInfos() {
		return this.bmeInvInfos;
	}

	public void setBmeInvInfos(List<BmeInvInfo> bmeInvInfos) {
		this.bmeInvInfos = bmeInvInfos;
	}

	public BmeInvInfo addBmeInvInfo(BmeInvInfo bmeInvInfo) {
		getBmeInvInfos().add(bmeInvInfo);
		bmeInvInfo.setBmePayroll(this);

		return bmeInvInfo;
	}

	public BmeInvInfo removeBmeInvInfo(BmeInvInfo bmeInvInfo) {
		getBmeInvInfos().remove(bmeInvInfo);
		bmeInvInfo.setBmePayroll(null);

		return bmeInvInfo;
	}

	public BmeContract getBmeContract() {
		return this.bmeContract;
	}

	public void setBmeContract(BmeContract bmeContract) {
		this.bmeContract = bmeContract;
	}

	public List<BmeRtnInfo> getBmeRtnInfos() {
		return this.bmeRtnInfos;
	}

	public void setBmeRtnInfos(List<BmeRtnInfo> bmeRtnInfos) {
		this.bmeRtnInfos = bmeRtnInfos;
	}

	public BmeRtnInfo addBmeRtnInfo(BmeRtnInfo bmeRtnInfo) {
		getBmeRtnInfos().add(bmeRtnInfo);
		bmeRtnInfo.setBmePayroll(this);

		return bmeRtnInfo;
	}

	public BmeRtnInfo removeBmeRtnInfo(BmeRtnInfo bmeRtnInfo) {
		getBmeRtnInfos().remove(bmeRtnInfo);
		bmeRtnInfo.setBmePayroll(null);

		return bmeRtnInfo;
	}
	public List<BmePayrollDetail> getBmePayrollDetails() {
		return this.bmePayrollDetails;
	}

	public void setBmePayrollDetails(List<BmePayrollDetail> bmePayrollDetails) {
		this.bmePayrollDetails = bmePayrollDetails;
	}

	public BmePayrollDetail addBmePayrollDetail(BmePayrollDetail bmePayrollDetail) {
		getBmePayrollDetails().add(bmePayrollDetail);
		bmePayrollDetail.setBmePayroll(this);

		return bmePayrollDetail;
	}

	public BmePayrollDetail removeBmePayrollDetail(BmePayrollDetail bmePayrollDetail) {
		getBmePayrollDetails().remove(bmePayrollDetail);
		bmePayrollDetail.setBmePayroll(null);

		return bmePayrollDetail;
	}
}